import PySpice


#import spicemodule,atexit,sys
#bob=spicemodule.Spice()
#sys.stderr=spicemodule.SpiceStdErr()
#sys.stdout=spicemodule.SpiceStdOut()
#atexit.register(bob.finish)


print "Initialized the second script!!"

#c=1/0

PySpice.twobuttontimed("Some string",2,1,'blah','false blah','Test the button')
#test=PySpice.getvar('Junk')
#print "Junk is " + str(test)
PySpice.Command('drive s2 -10')
s2pos=PySpice.getpos('s2')
print "The position of s2 is " + str(s2pos)
alattice=PySpice.getvar('alat')
print "The a lattice parameter is " + str(alattice)
print "Now executing the wait"
PySpice.Command('wait 5')
print "Wait completed"

##joe=spicemodule.SpiceInit()
##
##joe.Command('drive s2 -50')
##blattice=joe.getvar('blat')
##print "The b lattice constant derived from joe was " + str(blattice)
##
##print "This is executing with a second instance of SPICE"
##
##ted=spicemodule.SpiceInit()
##
##s2pos=ted.getpos('s2')
##print "Ted's s2 position is " + str(s2pos)


print "Second Script Finished"



